<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	template="/pages/common/plantillaPrincipal.xhtml">

	<ui:define name="title">Nueva Tesis</ui:define>
	<ui:define name="cuerpo">
		<h:form id="frmNuevaTesis">
			<p:panel header="Nueva Tesis">
				<p:panel>
					<h:panelGrid border="0" columns="2">
						<h:panelGrid columns="1" border="0">
							<p:panel header="Tesis">
								<h:panelGrid columns="3">
									<h:outputLabel value="Codigo:" />
									<h:outputText value="#{nuevaTesis.objTesisService.objTesis.id}"
										id="codigoSalida" />
									<h:outputLabel></h:outputLabel>
								</h:panelGrid>
							</p:panel>
							<p:panel header="Lineas de Investigacion">
								<h:panelGrid columns="2" border="0">
									<h:outputLabel value="Linea:" />
									<p:selectOneMenu
										value="#{nuevaTesis.objTesisService.objLineaInvestigacion.id}"
										effect="fade">
										<f:selectItem itemLabel="Select One" itemValue="" />
										<f:selectItems
											value="#{nuevaTesis.objTesisService.arrLineaInvestigacion}"
											var="linea" itemLabel="#{linea.descripcion}"
											itemValue="#{linea.id}" />
									</p:selectOneMenu>
								</h:panelGrid>
							</p:panel>
						</h:panelGrid>
						<p:panel header="Datos de la tesis">
							<h:panelGrid columns="2" border="0">
								<h:outputLabel value="Tipo de Tesis:" />
								<p:selectOneMenu
									value="#{nuevaTesis.objTesisService.objTesis.tipo}"
									effect="fade">
									<f:selectItem itemLabel="Select One" itemValue="" />
									<f:selectItem itemValue="Grupal" itemLabel="Grupal" />
									<f:selectItem itemValue="Individual" itemLabel="Individual" />
								</p:selectOneMenu>
								<h:outputLabel value="Codigo de tesista 1:" />
								<h:inputText value="#{nuevaTesis.objTesisService.sAlumnoId1}"
									required="true" />
								<h:outputLabel value="Codigo de tesista 2:" />
								<h:inputText value="#{nuevaTesis.objTesisService.sAlumnoId2}"
									required="false" />
								<h:outputLabel value="Tema de la tesis:" />
								<h:inputText
									value="#{nuevaTesis.objTesisService.objTesis.titulo}"
									required="true" />
								<h:outputLabel value="Resumen: " />
								<h:inputTextarea rows="5" cols="80"
									value="#{nuevaTesis.objTesisService.objTesis.resumen}"
									required="true" />
								<h:outputLabel value="Documento:" />
								<p:fileUpload mode="simple" required="false" allowTypes="*.pdf"
									value="#{nuevaTesis.objTesisService.file}" />
							</h:panelGrid>
						</p:panel>
					</h:panelGrid>
				</p:panel>

				<p:panel header="Busqueda">
					<h:panelGrid columns="2" border="0">
						<h:outputLabel value="Tags de busqueda" />
						<h:inputTextarea rows="5" cols="80"
							value="#{nuevaTesis.objTesisService.objTagsTesis.descripcion}" />
					</h:panelGrid>
				</p:panel>

				<h:commandButton value="Guardar"
					actionListener="#{nuevaTesis.objTesisService.CrearNuevaTesis}" />
				<h:commandButton value="Cancelar" type="Reset" />

			</p:panel>
		</h:form>
	</ui:define>
	<ui:define name="izquierda">
		<p:panelMenu style="width:250px;font-size: small">
			<p:submenu label="Mantenimiento de Tesis">
				<p:menuitem value="Nueva Tesis"
					url="http://www.primefaces.org/showcase-labs/ui/home.jsf" />
				<p:menuitem value="Buscar Tesis"
					url="http://www.primefaces.org/documentation.html" />
			</p:submenu>
			<p:submenu label="Mantenimiento de Asesores">
				<p:menuitem value="Nuevo Asesor" url="http://forum.primefaces.org/" />
				<p:menuitem value="Buscar Asesor"
					url="http://www.primefaces.org/themes.html" />
			</p:submenu>
			<p:submenu label="Salir">
				<p:menuitem value="Asesor" url="/" />
			</p:submenu>
		</p:panelMenu>
	</ui:define>
</ui:composition>